<?php
/**
 * The SIDN EPP Domain Handle Object
 *
 * This will hold the complete Domain info SIDN can receive and give you
 *
 *
 *
 * @author Ralph de Boom <php5-sidnepp@mijndomein.nl>
 * @author Peter Keizer <php5-sidnepp@mijndomein.nl>
 * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License v3
 * @copyright http://www.mijndomein.nl/
 * @version 0.5
 * @link http://php5-sidnepp.svn.sourceforge.net/viewvc/php5-sidnepp/trunk/dev/docs/index.html
 * @see http://php5-sidnepp.svn.sourceforge.net/viewvc/php5-sidnepp/trunk/dev/docs/php5-sidnepp/SidnDomain.html
 * @package php5-sidnepp
 */

class SidnDomain
{
	/**
	 * @var string
	 */
	private $domainName;
	/**
	 * @var SidnDomainInfo
	 */
	private $domainInfo;
	/**
	 *
	 * @param string $DomainHandle
	 * @param SidnDomainInfo $DomainInfo
	 * @return void
	 */
	public function  __construct($domainName, SidnDomainInfo $domainInfo = null)
	{
		$this->setDomainName($domainName);
		if ($domainInfo)
		{
			$this->setDomainInfo($domainInfo);
		}
	}
	/**
	 * Sets the Domain info
	 * @param SidnDomainInfo $DomainInfo
	 */
	public function setDomainInfo(SidnDomainInfo $domainInfo)
	{
		$this->domainInfo = $domainInfo;
	}
	/**
	 * Gets the Domain info
	 * @return SidnDomainInfo
	 */
	public function getDomainInfo()
	{
		return $this->domainInfo;
	}
	/**
	 * Sets the Domain
	 * @param string $domainHandle
	 * @return void
	 */
	public function setDomainName($domainName)
	{		
		$this->domainName = $domainName;
	}
	/**
	 * Gets the Domain handle
	 * @return string
	 */
	public function getDomainName()
	{
		return $this->domainName;
	}
	/**
	 * Gets the xml notation for this object
	 * @return string
	 */
	public function toXml()
	{
		$xml = '<domain:name>'.$this->getDomainName().'</domain:name>';
		return $xml;
	}

}
